package org.longteng.dao.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

/**
* 开发给供电侧的接口应用token配置表
*/
@TableName(value="oauth_client")
public class OauthClient implements Serializable {
    /**
    * 客户唯一标识
    */
    @TableId(value="client_id",type= IdType.ASSIGN_UUID)
    private String clientId;

    /**
    * 分配的appid
    */
    private String appId;

    /**
    * 客户端(client)的访问密匙
    */
    private String appSecret;

    /**
    * 申请的权限范围
    */
    private String scope;

    /**
    * 能访问的资源id集合
    */
    private String resourceIds;

    /**
    * 权限类型
    */
    private String grantTypes;

    /**
    * 客户端的重定向URI
    */
    private String redirectUri;

    /**
    * 权限值
    */
    private String authorities;

    /**
    * 有效时间(秒)
    */
    private Integer tokenValidity;

    /**
    * 预留字段
    */
    private String additionalInfo;

    /**
    * 是否已生产
    */
    private Integer actived;

    /**
    * 是否为受信任
    */
    private Integer trusted;

    /**
    * 是否自动批准
    */
    private String autoApprove;
    /**
     * 生效时间
     */
    private Date activeDate;
    /**
     * 失效时间
     */
    private Date closeDate;

    public Date getActiveDate() {
        return activeDate;
    }

    public void setActiveDate(Date activeDate) {
        this.activeDate = activeDate;
    }

    public Date getCloseDate() {
        return closeDate;
    }

    public void setCloseDate(Date closeDate) {
        this.closeDate = closeDate;
    }

    public String getClientId() {
        return clientId;
    }

    public void setClientId(String clientId) {
        this.clientId = clientId;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getAppSecret() {
        return appSecret;
    }

    public void setAppSecret(String appSecret) {
        this.appSecret = appSecret;
    }

    public String getScope() {
        return scope;
    }

    public void setScope(String scope) {
        this.scope = scope;
    }

    public String getResourceIds() {
        return resourceIds;
    }

    public void setResourceIds(String resourceIds) {
        this.resourceIds = resourceIds;
    }

    public String getGrantTypes() {
        return grantTypes;
    }

    public void setGrantTypes(String grantTypes) {
        this.grantTypes = grantTypes;
    }

    public String getRedirectUri() {
        return redirectUri;
    }

    public void setRedirectUri(String redirectUri) {
        this.redirectUri = redirectUri;
    }

    public String getAuthorities() {
        return authorities;
    }

    public void setAuthorities(String authorities) {
        this.authorities = authorities;
    }

    public Integer getTokenValidity() {
        return tokenValidity;
    }

    public void setTokenValidity(Integer tokenValidity) {
        this.tokenValidity = tokenValidity;
    }

    public String getAdditionalInfo() {
        return additionalInfo;
    }

    public void setAdditionalInfo(String additionalInfo) {
        this.additionalInfo = additionalInfo;
    }

    public Integer getActived() {
        return actived;
    }

    public void setActived(Integer actived) {
        this.actived = actived;
    }

    public Integer getTrusted() {
        return trusted;
    }

    public void setTrusted(Integer trusted) {
        this.trusted = trusted;
    }

    public String getAutoApprove() {
        return autoApprove;
    }

    public void setAutoApprove(String autoApprove) {
        this.autoApprove = autoApprove;
    }

    @Override
    public String toString() {
        return "OauthClient{" +
                "clientId='" + clientId + '\'' +
                ", appId='" + appId + '\'' +
                ", appSecret='****" + appSecret + '\'' +
                ", scope='" + scope + '\'' +
                ", resourceIds='" + resourceIds + '\'' +
                ", grantTypes='" + grantTypes + '\'' +
                ", redirectUri='" + redirectUri + '\'' +
                ", authorities='" + authorities + '\'' +
                ", tokenValidity=" + tokenValidity +
                ", additionalInfo='" + additionalInfo + '\'' +
                ", actived=" + actived +
                ", trusted=" + trusted +
                ", activeDate=" + activeDate +
                ", closeDate=" + closeDate +
                ", autoApprove='" + autoApprove + '\'' +
                '}';
    }
}